/*
SQLyog Community v10.11 
MySQL - 5.1.30-community : Database - db_techno_school
*********************************************************************
*/

/*!40101 SET NAMES utf8 */;

/*!40101 SET SQL_MODE=''*/;

/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/`db_techno_school` /*!40100 DEFAULT CHARACTER SET latin1 */;

USE `db_techno_school`;

/*Table structure for table `konfigurasi` */

DROP TABLE IF EXISTS `konfigurasi`;

CREATE TABLE `konfigurasi` (
  `ID_KONFIGURASI` int(11) NOT NULL AUTO_INCREMENT,
  `URL_LOGO_CETAK` varchar(200) DEFAULT NULL,
  `TEXT_KETERANGAN` varchar(500) DEFAULT NULL,
  `TEXT_WELCOME` varchar(500) DEFAULT NULL,
  PRIMARY KEY (`ID_KONFIGURASI`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

/*Data for the table `konfigurasi` */

insert  into `konfigurasi`(`ID_KONFIGURASI`,`URL_LOGO_CETAK`,`TEXT_KETERANGAN`,`TEXT_WELCOME`) values (2,'logo_cetak.png','ISE(INTERNATIONAL STUDY EQUIPMENT)<br>\r\nSistem Informasi Manajemen Lembaga Pendidikan','<p><strong>WELCOME TO THE HELL</strong></p>');

/*Table structure for table `role` */

DROP TABLE IF EXISTS `role`;

CREATE TABLE `role` (
  `IDROLE` int(11) NOT NULL AUTO_INCREMENT,
  `NAMA_ROLE` varchar(50) DEFAULT NULL,
  `STATUS` int(11) DEFAULT NULL,
  PRIMARY KEY (`IDROLE`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;

/*Data for the table `role` */

insert  into `role`(`IDROLE`,`NAMA_ROLE`,`STATUS`) values (0,'Admin Diknas',1),(1,'Admin Sekolah',1),(2,'Guru',1),(3,'Karyawan',1),(4,'Siswa',1);

/*Table structure for table `tb_department` */

DROP TABLE IF EXISTS `tb_department`;

CREATE TABLE `tb_department` (
  `ID_DEPARTMENT` int(11) NOT NULL AUTO_INCREMENT,
  `ID_SEKOLAH` int(11) DEFAULT NULL,
  `NAMA_DEPARTMENT` varchar(50) DEFAULT NULL,
  `NIPKEPSEK` varchar(30) DEFAULT NULL,
  `KETERANGAN` text,
  `ISAKTIF` int(1) DEFAULT '1',
  PRIMARY KEY (`ID_DEPARTMENT`)
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;

/*Data for the table `tb_department` */

insert  into `tb_department`(`ID_DEPARTMENT`,`ID_SEKOLAH`,`NAMA_DEPARTMENT`,`NIPKEPSEK`,`KETERANGAN`,`ISAKTIF`) values (2,1,'SMP',NULL,NULL,1),(3,1,'SMA',NULL,NULL,1),(4,1,'SD',NULL,NULL,1),(6,1,'SMK','101','',1);

/*Table structure for table `tb_history_dmateri` */

DROP TABLE IF EXISTS `tb_history_dmateri`;

CREATE TABLE `tb_history_dmateri` (
  `ID_HISTORY_MATERI` int(11) NOT NULL AUTO_INCREMENT,
  `ID_MATERI` int(11) NOT NULL,
  `JML_DOWNLOAD` int(11) NOT NULL,
  `DOWNLOADER` varchar(200) NOT NULL,
  `DOWNLOAD_TIME` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID_HISTORY_MATERI`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

/*Data for the table `tb_history_dmateri` */

insert  into `tb_history_dmateri`(`ID_HISTORY_MATERI`,`ID_MATERI`,`JML_DOWNLOAD`,`DOWNLOADER`,`DOWNLOAD_TIME`) values (1,1,1,'3','2012-11-20 06:39:31');

/*Table structure for table `tb_history_dsurat` */

DROP TABLE IF EXISTS `tb_history_dsurat`;

CREATE TABLE `tb_history_dsurat` (
  `ID_HISTORY_SURAT` int(11) NOT NULL AUTO_INCREMENT,
  `ID_SURAT` int(11) NOT NULL,
  `JML_DOWNLOAD` int(11) NOT NULL,
  `DOWNLOADER` varchar(200) NOT NULL,
  `DOWNLOAD_TIME` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID_HISTORY_SURAT`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

/*Data for the table `tb_history_dsurat` */

insert  into `tb_history_dsurat`(`ID_HISTORY_SURAT`,`ID_SURAT`,`JML_DOWNLOAD`,`DOWNLOADER`,`DOWNLOAD_TIME`) values (1,2,1,'3','2012-11-20 07:01:40'),(2,10,1,'3','2012-11-29 23:30:00');

/*Table structure for table `tb_jadwal_jam_belajar` */

DROP TABLE IF EXISTS `tb_jadwal_jam_belajar`;

CREATE TABLE `tb_jadwal_jam_belajar` (
  `ID_JJB` int(11) NOT NULL AUTO_INCREMENT,
  `ID_SEKOLAH` varchar(50) NOT NULL,
  `TAHUN_AJARAN` varchar(9) NOT NULL,
  `JAM_KE` varchar(3) NOT NULL,
  `JAM_MULAI` time NOT NULL,
  `JAM_SELESAI` time NOT NULL,
  `KETERANGAN` text,
  PRIMARY KEY (`ID_JJB`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=latin1;

/*Data for the table `tb_jadwal_jam_belajar` */

insert  into `tb_jadwal_jam_belajar`(`ID_JJB`,`ID_SEKOLAH`,`TAHUN_AJARAN`,`JAM_KE`,`JAM_MULAI`,`JAM_SELESAI`,`KETERANGAN`) values (1,'1','7','1','06:30:00','08:00:00',NULL),(2,'1','7','2','08:00:00','09:30:00',NULL),(11,'1','7','3','09:30:00','10:30:00','');

/*Table structure for table `tb_jadwal_pelajaran` */

DROP TABLE IF EXISTS `tb_jadwal_pelajaran`;

CREATE TABLE `tb_jadwal_pelajaran` (
  `ID_JADWAL_PELAJARAN` int(11) NOT NULL AUTO_INCREMENT,
  `ID_SEKOLAH` int(11) NOT NULL,
  `ID_TAHUNAJARAN` int(11) NOT NULL,
  `ID_TINGKAT` int(2) NOT NULL,
  `ID_KELAS` int(2) NOT NULL,
  `ID_SEMESTER` int(2) NOT NULL,
  `HARI` int(2) NOT NULL,
  `JAM_KE` varchar(12) NOT NULL,
  `KODE_MATA_PELAJARAN` varchar(3) NOT NULL,
  `NIP` varchar(12) NOT NULL,
  `KETERANGAN` varchar(300) DEFAULT NULL,
  PRIMARY KEY (`ID_SEKOLAH`,`ID_TAHUNAJARAN`,`ID_TINGKAT`,`ID_KELAS`,`ID_SEMESTER`,`HARI`,`JAM_KE`),
  UNIQUE KEY `ID_JADWAL_PELAJARAN` (`ID_JADWAL_PELAJARAN`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=latin1;

/*Data for the table `tb_jadwal_pelajaran` */

insert  into `tb_jadwal_pelajaran`(`ID_JADWAL_PELAJARAN`,`ID_SEKOLAH`,`ID_TAHUNAJARAN`,`ID_TINGKAT`,`ID_KELAS`,`ID_SEMESTER`,`HARI`,`JAM_KE`,`KODE_MATA_PELAJARAN`,`NIP`,`KETERANGAN`) values (1,1,7,5,1,4,1,'1','FIS','101',NULL),(2,1,7,5,1,4,1,'2','FIS','101',NULL),(3,1,7,5,1,4,1,'3','FIS','101',NULL),(6,1,7,5,1,4,2,'3','KIM','103',NULL),(7,1,7,5,1,4,3,'1','KIM','121213',''),(8,1,7,5,1,4,3,'2','FIS','324234234',''),(9,1,7,5,1,4,7,'1','MAT','121213',''),(10,1,7,5,2,4,1,'1','FIS','1234567890',''),(11,1,7,5,2,4,1,'2','FIS','1234567890',''),(12,1,7,5,2,4,2,'1','MAT','121213',''),(13,1,7,5,2,4,2,'2','MAT','121213',''),(14,1,7,5,2,4,2,'3','MAT','121213',''),(15,1,7,5,2,4,3,'1','FIS','121213',''),(16,1,7,5,2,4,3,'2','FIS','121213',''),(17,1,7,5,2,4,3,'3','KIM','324234234',''),(18,1,7,5,2,4,4,'1','KIM','121213',''),(19,1,7,5,2,4,4,'2','KIM','121213',''),(20,1,7,5,2,4,5,'1','FIS','121213',''),(21,1,7,5,2,4,5,'2','FIS','121213',''),(22,1,7,5,2,4,6,'1','FIS','121213','');

/*Table structure for table `tb_kategori` */

DROP TABLE IF EXISTS `tb_kategori`;

CREATE TABLE `tb_kategori` (
  `ID_KATEGORI` int(11) NOT NULL AUTO_INCREMENT,
  `NAMA_KATEGORI` varchar(100) DEFAULT NULL,
  `KETERANGAN` varchar(250) DEFAULT NULL,
  PRIMARY KEY (`ID_KATEGORI`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

/*Data for the table `tb_kategori` */

insert  into `tb_kategori`(`ID_KATEGORI`,`NAMA_KATEGORI`,`KETERANGAN`) values (1,'POLITIK','ini adalah kategori politik'),(2,'EKONOMI','ini adalah kategori ekonomi');

/*Table structure for table `tb_master_agama` */

DROP TABLE IF EXISTS `tb_master_agama`;

CREATE TABLE `tb_master_agama` (
  `ID_AGAMA` int(11) NOT NULL AUTO_INCREMENT,
  `NAMA_AGAMA` varchar(100) DEFAULT NULL,
  `KETERANGAN` varchar(300) DEFAULT NULL,
  PRIMARY KEY (`ID_AGAMA`)
) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;

/*Data for the table `tb_master_agama` */

insert  into `tb_master_agama`(`ID_AGAMA`,`NAMA_AGAMA`,`KETERANGAN`) values (1,'Islam',''),(2,'Hindu',''),(3,'Katolik',''),(4,'Kristen',''),(6,'Budha',''),(8,'Konghucu',NULL);

/*Table structure for table `tb_master_bahasa` */

DROP TABLE IF EXISTS `tb_master_bahasa`;

CREATE TABLE `tb_master_bahasa` (
  `ID_BAHASA` int(11) NOT NULL AUTO_INCREMENT,
  `NAMA_BAHASA` varchar(255) DEFAULT NULL,
  `KETERANGAN` text,
  PRIMARY KEY (`ID_BAHASA`)
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;

/*Data for the table `tb_master_bahasa` */

insert  into `tb_master_bahasa`(`ID_BAHASA`,`NAMA_BAHASA`,`KETERANGAN`) values (1,'Indonesia',NULL),(2,'Inggris',NULL),(3,'Arab',NULL),(4,'Mandarin',NULL),(5,'Korea',NULL),(6,'Spanyol',NULL);

/*Table structure for table `tb_master_kelas` */

DROP TABLE IF EXISTS `tb_master_kelas`;

CREATE TABLE `tb_master_kelas` (
  `ID_KELAS` int(11) DEFAULT NULL,
  `ID_SEKOLAH` int(11) DEFAULT NULL,
  `ID_TAHUNAJARAN` int(11) NOT NULL,
  `ID_TINGKAT` int(11) NOT NULL,
  `KELAS` varchar(10) NOT NULL,
  `NIP_WALI` varchar(12) NOT NULL,
  `KAPASITAS` int(3) NOT NULL,
  `ISAKTIF` int(1) DEFAULT '1',
  `KETERANGAN` text,
  PRIMARY KEY (`ID_TAHUNAJARAN`,`ID_TINGKAT`,`KELAS`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Data for the table `tb_master_kelas` */

insert  into `tb_master_kelas`(`ID_KELAS`,`ID_SEKOLAH`,`ID_TAHUNAJARAN`,`ID_TINGKAT`,`KELAS`,`NIP_WALI`,`KAPASITAS`,`ISAKTIF`,`KETERANGAN`) values (1,1,7,5,'X-1','101',40,1,''),(10,1,7,5,'X-10','101',40,1,''),(2,1,7,5,'X-2','121213',40,1,''),(3,1,7,5,'X-3','123456789012',40,1,''),(4,1,7,5,'X-4','123456789012',44,1,''),(5,1,7,5,'X-5','101',40,1,''),(6,1,7,5,'X-6','123456789012',40,1,''),(7,1,7,5,'X-7','123456789012',40,1,''),(8,1,7,5,'X-8','121213',40,1,''),(9,1,7,5,'X-9','121213',40,1,''),(11,1,7,6,'XI-A1','101',40,1,''),(12,1,7,6,'XI-A2','101',40,1,''),(13,1,7,6,'XI-A3','101',40,1,''),(14,1,7,6,'XI-A4','101',40,1,''),(15,1,7,6,'XI-A5','101',40,1,''),(16,1,7,6,'XI-A6','101',40,1,''),(17,1,7,6,'XI-A7','101',40,1,''),(18,1,7,6,'XI-S1','101',40,1,''),(19,1,7,6,'XI-S2','101',40,1,''),(20,1,7,6,'XI-S3','101',40,1,''),(21,1,7,7,'XII-A1','101',40,1,''),(22,1,7,7,'XII-A2','121213',40,1,''),(23,1,7,7,'XII-A3','101',40,1,''),(24,1,7,7,'XII-A4','101',40,1,''),(25,1,7,7,'XII-A5','101',40,1,''),(26,1,7,7,'XII-A6','101',40,1,''),(27,1,7,7,'XII-A7','121213',40,1,''),(28,1,7,7,'XII-S1','101',40,1,''),(29,1,7,7,'XII-S2','123456789012',40,1,''),(30,1,7,7,'XII-S3','121213',40,1,''),(31,1,8,5,'X-1','121213',50,1,NULL),(32,1,8,5,'X-2','121213',40,1,NULL),(33,1,8,5,'X-3','121213',40,1,NULL),(34,1,8,5,'X-4','101',40,1,NULL),(35,1,8,6,'XI-A1','101',50,1,NULL),(36,1,8,6,'XI-A2','101',50,1,NULL),(37,1,8,6,'XI-A3','101',50,1,NULL),(38,1,8,6,'XI-A4','101',40,1,NULL);

/*Table structure for table `tb_master_kondisi` */

DROP TABLE IF EXISTS `tb_master_kondisi`;

CREATE TABLE `tb_master_kondisi` (
  `ID_KONDISI` int(11) NOT NULL AUTO_INCREMENT,
  `NAMA_KONDISI` varchar(100) DEFAULT NULL,
  `KETERANGAN` varchar(300) DEFAULT NULL,
  PRIMARY KEY (`ID_KONDISI`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

/*Data for the table `tb_master_kondisi` */

insert  into `tb_master_kondisi`(`ID_KONDISI`,`NAMA_KONDISI`,`KETERANGAN`) values (1,'Kurang Mampu',''),(2,'Berkecukupan','');

/*Table structure for table `tb_master_pekerjaan` */

DROP TABLE IF EXISTS `tb_master_pekerjaan`;

CREATE TABLE `tb_master_pekerjaan` (
  `ID_PEKERJAAN` int(11) NOT NULL AUTO_INCREMENT,
  `NAMA_PEKERJAAN` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`ID_PEKERJAAN`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;

/*Data for the table `tb_master_pekerjaan` */

insert  into `tb_master_pekerjaan`(`ID_PEKERJAAN`,`NAMA_PEKERJAAN`) values (1,'Wiraswasta'),(2,'PNS'),(3,'Pegawai Swasta'),(4,'TNI/Polri');

/*Table structure for table `tb_master_rwtpendidikan` */

DROP TABLE IF EXISTS `tb_master_rwtpendidikan`;

CREATE TABLE `tb_master_rwtpendidikan` (
  `ID_RWTPENDIDIKAN` int(11) NOT NULL AUTO_INCREMENT,
  `NAMA_PENDIDIKAN` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`ID_RWTPENDIDIKAN`)
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;

/*Data for the table `tb_master_rwtpendidikan` */

insert  into `tb_master_rwtpendidikan`(`ID_RWTPENDIDIKAN`,`NAMA_PENDIDIKAN`) values (1,'SD'),(2,'SMP'),(3,'SMA'),(4,'Sarjana (S1)'),(5,'Magister (S2)'),(6,'Doctor (S3)');

/*Table structure for table `tb_master_sekolah` */

DROP TABLE IF EXISTS `tb_master_sekolah`;

CREATE TABLE `tb_master_sekolah` (
  `ID_SEKOLAH` int(11) NOT NULL AUTO_INCREMENT,
  `ID_DEPARTMENT` int(11) DEFAULT NULL,
  `NAMA_SEKOLAH` varchar(50) DEFAULT NULL,
  `ALAMAT_SEKOLAH_1` varchar(100) NOT NULL,
  `NO_TELEPON_1` varchar(12) NOT NULL,
  `NO_TELEPON_11` varchar(12) DEFAULT NULL,
  `FAX_1` varchar(12) DEFAULT NULL,
  `ALAMAT_SEKOLAH_2` varchar(100) DEFAULT NULL,
  `NO_TELEPON_2` varchar(12) DEFAULT NULL,
  `NO_TELEPON_22` varchar(12) DEFAULT NULL,
  `FAX_2` varchar(12) DEFAULT NULL,
  `WEBSITE` varchar(50) DEFAULT NULL,
  `email` varchar(50) DEFAULT NULL,
  `ISAKTIF` int(1) DEFAULT NULL,
  `FOTO` varchar(500) DEFAULT NULL,
  PRIMARY KEY (`ID_SEKOLAH`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

/*Data for the table `tb_master_sekolah` */

insert  into `tb_master_sekolah`(`ID_SEKOLAH`,`ID_DEPARTMENT`,`NAMA_SEKOLAH`,`ALAMAT_SEKOLAH_1`,`NO_TELEPON_1`,`NO_TELEPON_11`,`FAX_1`,`ALAMAT_SEKOLAH_2`,`NO_TELEPON_2`,`NO_TELEPON_22`,`FAX_2`,`WEBSITE`,`email`,`ISAKTIF`,`FOTO`) values (1,3,'ISE (International Study Equipment)','Jl. Selomangkleng No.1','0354770128','085645783404','0354770129','0','0354770121','085645787740','0354770122','','',1,'logo_instansi.png');

/*Table structure for table `tb_master_semester` */

DROP TABLE IF EXISTS `tb_master_semester`;

CREATE TABLE `tb_master_semester` (
  `ID_SMT` int(11) DEFAULT NULL,
  `ID_SEKOLAH` int(11) DEFAULT NULL,
  `SEMESTER` int(2) NOT NULL,
  `DEPARTMENT` varchar(50) NOT NULL,
  `ISAKTIF` int(1) DEFAULT '1',
  `KETERANGAN` text,
  PRIMARY KEY (`SEMESTER`,`DEPARTMENT`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Data for the table `tb_master_semester` */

insert  into `tb_master_semester`(`ID_SMT`,`ID_SEKOLAH`,`SEMESTER`,`DEPARTMENT`,`ISAKTIF`,`KETERANGAN`) values (4,1,1,'3',1,'SMA smt1'),(5,1,2,'3',0,'coba neh');

/*Table structure for table `tb_master_status` */

DROP TABLE IF EXISTS `tb_master_status`;

CREATE TABLE `tb_master_status` (
  `ID_STATUS` int(11) NOT NULL AUTO_INCREMENT,
  `STATUS` varchar(200) DEFAULT NULL,
  `KETERANGAN` text,
  `IS_AKADEMIK` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`ID_STATUS`)
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;

/*Data for the table `tb_master_status` */

insert  into `tb_master_status`(`ID_STATUS`,`STATUS`,`KETERANGAN`,`IS_AKADEMIK`) values (2,'Guru Honorer','','1'),(3,'Guru Tetap','','1'),(4,'Asisten Lab','','1'),(5,'Pegawai',NULL,'0');

/*Table structure for table `tb_master_suku` */

DROP TABLE IF EXISTS `tb_master_suku`;

CREATE TABLE `tb_master_suku` (
  `ID_SUKU` int(11) NOT NULL AUTO_INCREMENT,
  `SUKU` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`ID_SUKU`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;

/*Data for the table `tb_master_suku` */

insert  into `tb_master_suku`(`ID_SUKU`,`SUKU`) values (1,'Jawa'),(2,'Batak'),(3,'Minang'),(4,'Sunda');

/*Table structure for table `tb_master_tahun_ajaran` */

DROP TABLE IF EXISTS `tb_master_tahun_ajaran`;

CREATE TABLE `tb_master_tahun_ajaran` (
  `ID_TA` int(11) NOT NULL,
  `ID_SEKOLAH` int(11) DEFAULT NULL,
  `TAHUN_AJARAN` varchar(9) NOT NULL,
  `DEPARTMENT` varchar(3) NOT NULL,
  `TGL_MULAI` date NOT NULL,
  `TGL_AKHIR` date NOT NULL,
  `ISAKTIF` int(1) DEFAULT '1',
  `KETERANGAN` text NOT NULL,
  PRIMARY KEY (`TAHUN_AJARAN`,`DEPARTMENT`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Data for the table `tb_master_tahun_ajaran` */

insert  into `tb_master_tahun_ajaran`(`ID_TA`,`ID_SEKOLAH`,`TAHUN_AJARAN`,`DEPARTMENT`,`TGL_MULAI`,`TGL_AKHIR`,`ISAKTIF`,`KETERANGAN`) values (7,1,'2011/2012','3','2011-09-01','2012-09-01',1,''),(8,1,'2012/2013','3','2012-09-01','2013-09-01',0,'');

/*Table structure for table `tb_master_tingkat` */

DROP TABLE IF EXISTS `tb_master_tingkat`;

CREATE TABLE `tb_master_tingkat` (
  `ID_TINGKAT` int(11) DEFAULT NULL,
  `ID_SEKOLAH` int(11) DEFAULT NULL,
  `TINGKAT` varchar(3) NOT NULL,
  `DEPARTMENT` varchar(50) NOT NULL,
  `ISAKTIF` int(1) DEFAULT '1',
  `KETERANGAN` text,
  PRIMARY KEY (`TINGKAT`,`DEPARTMENT`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Data for the table `tb_master_tingkat` */

insert  into `tb_master_tingkat`(`ID_TINGKAT`,`ID_SEKOLAH`,`TINGKAT`,`DEPARTMENT`,`ISAKTIF`,`KETERANGAN`) values (5,1,'X','3',1,'Kelas 10'),(6,1,'XI','3',1,'Kelas 11'),(7,1,'XII','3',1,'Kelas 12');

/*Table structure for table `tb_pegawai` */

DROP TABLE IF EXISTS `tb_pegawai`;

CREATE TABLE `tb_pegawai` (
  `NIP` varchar(10) NOT NULL,
  `IS_AKADEMIK` int(1) DEFAULT NULL,
  `STATUS` varchar(50) DEFAULT NULL,
  `NAMA_LENGKAP` varchar(50) NOT NULL,
  `NAMA_PANGGILAN` varchar(50) DEFAULT NULL,
  `JENIS_KELAMIN` varchar(1) DEFAULT NULL,
  `GELAR_DEPAN` varchar(50) DEFAULT NULL,
  `GELAR_BELAKANG` varchar(10) DEFAULT NULL,
  `TEMPAT_LAHIR` varchar(50) DEFAULT NULL,
  `TANGGAL_LAHIR` date DEFAULT NULL,
  `AGAMA` varchar(25) DEFAULT NULL,
  `MENIKAH` int(1) DEFAULT NULL,
  `NO_KTP` varchar(50) DEFAULT NULL,
  `ALAMAT_ASAL` varchar(200) DEFAULT NULL,
  `ALAMAT_DOMISILI` varchar(200) DEFAULT NULL,
  `TELEPON` varchar(12) DEFAULT NULL,
  `HP` varchar(12) DEFAULT NULL,
  `EMAIL` varchar(50) DEFAULT NULL,
  `FOTO` varchar(300) DEFAULT NULL,
  `KETERANGAN` text,
  `ISAKTIF` int(1) DEFAULT NULL,
  PRIMARY KEY (`NIP`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Data for the table `tb_pegawai` */

insert  into `tb_pegawai`(`NIP`,`IS_AKADEMIK`,`STATUS`,`NAMA_LENGKAP`,`NAMA_PANGGILAN`,`JENIS_KELAMIN`,`GELAR_DEPAN`,`GELAR_BELAKANG`,`TEMPAT_LAHIR`,`TANGGAL_LAHIR`,`AGAMA`,`MENIKAH`,`NO_KTP`,`ALAMAT_ASAL`,`ALAMAT_DOMISILI`,`TELEPON`,`HP`,`EMAIL`,`FOTO`,`KETERANGAN`,`ISAKTIF`) values ('101',0,'5','Simanjuntak22','siman','L','H','S.Kom','Surabaya','1974-05-03','3',0,'','kertajaya','','0354770128','0812187329','','101.jpg','akfdajlf\r\nafsjalf\r\naskfjal\r\njlafj\r\naslkfj\r\najfllafajl',1),('1111111111',1,'2','sonyyy','','L','','','asgasd','1964-11-18','1',0,'','','','','','',NULL,'',1),('121213',1,'2','Zinzia','Zies','L','H','S.Kom','Surabaya','1980-08-05','1',0,'1234567890','','','0354770128','081235848937','','121213.jpg','',1),('1233333333',0,'5','Sunaryo','','L','','','Surabaya','1947-01-01','1',0,'','','','','','','1233333333.gif','',1),('22222222',1,'2','gfdssdfgdfs','','L','','','fasdgasdg','1963-12-12','1',0,'','','','','','','22222222.','',1),('44444444',1,'2','jonooo','','L','','','fasdfads','1963-02-19','3',0,'','','','','','',NULL,'',1),('5673488',1,'2','surosoooooo','','L','','','kediri','1964-01-19','1',0,'','','','','','','5673488.gif','',1),('6345634',1,'2','agghgdfg','','L','','','fadsgsf','1962-08-18','1',0,'','','','','','','6345634.gif','',1),('872384',1,'2','klajsdlkf','','L','','','asdfasd','1964-09-18','1',0,'','','','','','','872384.','',1),('8789790249',0,'3','ziniiiiiiiiiii','','L','','','kristen','1978-09-05','1',0,'','','','','','','','',1),('8974897584',1,'3','Renni Andriani','','L','','','Surabaya','1948-01-02','1',0,'','','','','','','8974897584.jpg','',1);

/*Table structure for table `tb_pelajaran` */

DROP TABLE IF EXISTS `tb_pelajaran`;

CREATE TABLE `tb_pelajaran` (
  `ID_SEKOLAH` varchar(50) NOT NULL,
  `TAHUN_AJARAN` varchar(9) NOT NULL,
  `KODE_MATA_PELAJARAN` varchar(3) NOT NULL,
  `NAMA_MATA_PELAJARAN` varchar(50) NOT NULL,
  `KETERANGAN` text,
  PRIMARY KEY (`ID_SEKOLAH`,`TAHUN_AJARAN`,`KODE_MATA_PELAJARAN`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Data for the table `tb_pelajaran` */

insert  into `tb_pelajaran`(`ID_SEKOLAH`,`TAHUN_AJARAN`,`KODE_MATA_PELAJARAN`,`NAMA_MATA_PELAJARAN`,`KETERANGAN`) values ('1','7','FIS','Fisika',NULL),('1','7','KIM','Kimia',''),('1','7','MAT','Matematika',''),('1','8','FIS','Fisika','');

/*Table structure for table `tb_pelajaran_aspek_nilai` */

DROP TABLE IF EXISTS `tb_pelajaran_aspek_nilai`;

CREATE TABLE `tb_pelajaran_aspek_nilai` (
  `ID_ASPEK` int(11) NOT NULL AUTO_INCREMENT,
  `ID_SEKOLAH` varchar(50) DEFAULT NULL,
  `TAHUN_AJARAN` varchar(9) DEFAULT NULL,
  `KODE_MATA_PELAJARAN` varchar(3) NOT NULL,
  `KODE_PENILAIAN` varchar(20) NOT NULL,
  `ASPEK_PENILAIAN` varchar(50) NOT NULL,
  `KETERANGAN` text,
  PRIMARY KEY (`ID_ASPEK`,`KODE_PENILAIAN`,`ASPEK_PENILAIAN`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

/*Data for the table `tb_pelajaran_aspek_nilai` */

insert  into `tb_pelajaran_aspek_nilai`(`ID_ASPEK`,`ID_SEKOLAH`,`TAHUN_AJARAN`,`KODE_MATA_PELAJARAN`,`KODE_PENILAIAN`,`ASPEK_PENILAIAN`,`KETERANGAN`) values (1,'1','7','FIS','PKON','Pemahaman Konsep','coba'),(2,'1','8','FIS','PRAK','Praktikum',''),(3,'1','8','FIS','PKON','Pemahaman Konsep','');

/*Table structure for table `tb_pelajaran_grading` */

DROP TABLE IF EXISTS `tb_pelajaran_grading`;

CREATE TABLE `tb_pelajaran_grading` (
  `ID_GRADE` bigint(100) NOT NULL AUTO_INCREMENT,
  `ID_SEKOLAH` varchar(50) NOT NULL,
  `TAHUN_AJARAN` varchar(9) NOT NULL,
  `KODE_MATA_PELAJARAN` varchar(3) NOT NULL,
  `NILAI_MIN` decimal(5,2) NOT NULL,
  `NILAI_MAX` decimal(5,2) NOT NULL,
  `GRADE` varchar(2) NOT NULL,
  `KETERANGAN` text,
  PRIMARY KEY (`ID_GRADE`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=latin1;

/*Data for the table `tb_pelajaran_grading` */

insert  into `tb_pelajaran_grading`(`ID_GRADE`,`ID_SEKOLAH`,`TAHUN_AJARAN`,`KODE_MATA_PELAJARAN`,`NILAI_MIN`,`NILAI_MAX`,`GRADE`,`KETERANGAN`) values (11,'1','7','FIS','90.00','100.00','A',NULL),(12,'1','7','FIS','80.00','90.00','AB',NULL),(13,'1','7','FIS','70.00','80.00','B',NULL),(14,'1','7','FIS','60.00','70.00','C',NULL),(15,'1','7','FIS','50.00','60.00','D',NULL),(16,'1','7','FIS','10.00','50.00','E',NULL);

/*Table structure for table `tb_pelajaran_guru` */

DROP TABLE IF EXISTS `tb_pelajaran_guru`;

CREATE TABLE `tb_pelajaran_guru` (
  `ID_PG` int(11) NOT NULL AUTO_INCREMENT,
  `ID_SEKOLAH` varchar(50) NOT NULL,
  `TAHUN_AJARAN` varchar(9) NOT NULL,
  `ID_TINGKAT` int(2) NOT NULL,
  `ID_KELAS` varchar(10) NOT NULL,
  `ID_SEMESTER` int(2) NOT NULL,
  `KODE_MATA_PELAJARAN` varchar(3) NOT NULL,
  `NIP` varchar(12) NOT NULL,
  `KETERANGAN` text,
  PRIMARY KEY (`ID_PG`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;

/*Data for the table `tb_pelajaran_guru` */

insert  into `tb_pelajaran_guru`(`ID_PG`,`ID_SEKOLAH`,`TAHUN_AJARAN`,`ID_TINGKAT`,`ID_KELAS`,`ID_SEMESTER`,`KODE_MATA_PELAJARAN`,`NIP`,`KETERANGAN`) values (1,'1','7',5,'1',4,'FIS','101','cccc'),(2,'1','7',5,'1',4,'FIS','121213',''),(3,'1','7',5,'2',4,'FIS','123456789012',''),(4,'1','7',5,'1',4,'FIS','123456789012',''),(5,'1','7',5,'1',4,'FIS','1234567890','test');

/*Table structure for table `tb_pelajaran_jenis_ujian` */

DROP TABLE IF EXISTS `tb_pelajaran_jenis_ujian`;

CREATE TABLE `tb_pelajaran_jenis_ujian` (
  `ID_JENIS_UJIAN` int(11) NOT NULL AUTO_INCREMENT,
  `ID_SEKOLAH` varchar(50) NOT NULL,
  `TAHUN_AJARAN` varchar(9) NOT NULL,
  `KODE_MATA_PELAJARAN` varchar(3) NOT NULL,
  `KODE_UJIAN` varchar(20) NOT NULL,
  `NAMA_UJIAN` varchar(50) NOT NULL,
  `PROSENTASE` varchar(3) NOT NULL,
  `DESKRIPSI` text,
  PRIMARY KEY (`ID_JENIS_UJIAN`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

/*Data for the table `tb_pelajaran_jenis_ujian` */

insert  into `tb_pelajaran_jenis_ujian`(`ID_JENIS_UJIAN`,`ID_SEKOLAH`,`TAHUN_AJARAN`,`KODE_MATA_PELAJARAN`,`KODE_UJIAN`,`NAMA_UJIAN`,`PROSENTASE`,`DESKRIPSI`) values (1,'1','7','FIS','F-01','PR','30','PR'),(2,'1','7','FIS','F-02','TUGAS','30','Tugas-1'),(3,'1','7','KIM','K-01','UTS','40','UTS');

/*Table structure for table `tb_pelajaran_nilai_raport_siswa` */

DROP TABLE IF EXISTS `tb_pelajaran_nilai_raport_siswa`;

CREATE TABLE `tb_pelajaran_nilai_raport_siswa` (
  `ID_RAPORT` int(11) NOT NULL AUTO_INCREMENT,
  `ID_SEKOLAH` varchar(50) NOT NULL,
  `TAHUN_AJARAN` varchar(9) NOT NULL,
  `ID_TINGKAT` int(2) NOT NULL,
  `ID_KELAS` varchar(10) NOT NULL,
  `ID_SEMESTER` int(2) NOT NULL,
  `KODE_MATA_PELAJARAN` varchar(3) NOT NULL,
  `NISN` varchar(20) NOT NULL,
  `NILAI` decimal(5,2) NOT NULL,
  `NILAI_HURUF` varchar(2) DEFAULT NULL,
  `KETERANGAN` text,
  PRIMARY KEY (`ID_RAPORT`)
) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=latin1;

/*Data for the table `tb_pelajaran_nilai_raport_siswa` */

insert  into `tb_pelajaran_nilai_raport_siswa`(`ID_RAPORT`,`ID_SEKOLAH`,`TAHUN_AJARAN`,`ID_TINGKAT`,`ID_KELAS`,`ID_SEMESTER`,`KODE_MATA_PELAJARAN`,`NISN`,`NILAI`,`NILAI_HURUF`,`KETERANGAN`) values (31,'1','7',5,'1',4,'FIS','123','80.00','B',''),(32,'1','7',5,'1',4,'FIS','1234','80.00','B',''),(33,'1','7',5,'1',4,'FIS','5207100089','85.00','AB',''),(34,'1','7',5,'1',4,'FIS','88888888','85.00','AB',''),(35,'1','7',5,'1',4,'FIS','97876763','50.00','E',''),(36,'1','7',5,'1',4,'FIS','9999999999','100.00','A','');

/*Table structure for table `tb_pelajaran_nilai_siswa` */

DROP TABLE IF EXISTS `tb_pelajaran_nilai_siswa`;

CREATE TABLE `tb_pelajaran_nilai_siswa` (
  `ID_NILAI_SISWA` int(11) NOT NULL AUTO_INCREMENT,
  `ID_SEKOLAH` varchar(50) NOT NULL,
  `TAHUN_AJARAN` varchar(9) NOT NULL,
  `ID_TINGKAT` int(2) NOT NULL,
  `ID_KELAS` varchar(10) NOT NULL,
  `ID_SEMESTER` int(2) NOT NULL,
  `KODE_MATA_PELAJARAN` varchar(3) NOT NULL,
  `KODE_UJIAN` varchar(20) NOT NULL,
  `NISN` varchar(20) NOT NULL,
  `NILAI` decimal(5,2) NOT NULL,
  `KETERANGAN` text,
  PRIMARY KEY (`ID_NILAI_SISWA`)
) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=latin1;

/*Data for the table `tb_pelajaran_nilai_siswa` */

insert  into `tb_pelajaran_nilai_siswa`(`ID_NILAI_SISWA`,`ID_SEKOLAH`,`TAHUN_AJARAN`,`ID_TINGKAT`,`ID_KELAS`,`ID_SEMESTER`,`KODE_MATA_PELAJARAN`,`KODE_UJIAN`,`NISN`,`NILAI`,`KETERANGAN`) values (35,'1','7',5,'1',4,'FIS','F-01','123','75.00',''),(36,'1','7',5,'1',4,'FIS','F-02','123','75.00',''),(37,'1','7',5,'1',4,'FIS','UAS1','123','75.00',''),(38,'1','7',5,'1',4,'FIS','F-01','1234','80.00',''),(39,'1','7',5,'1',4,'FIS','F-02','1234','80.00',''),(40,'1','7',5,'1',4,'FIS','UAS1','1234','80.00',''),(41,'1','7',5,'1',4,'FIS','F-01','5207100089','80.00',''),(42,'1','7',5,'1',4,'FIS','F-02','5207100089','90.00',''),(43,'1','7',5,'1',4,'FIS','UAS1','5207100089','85.00',''),(44,'1','7',5,'1',4,'FIS','F-01','88888888','85.00',''),(45,'1','7',5,'1',4,'FIS','F-02','88888888','85.00',''),(46,'1','7',5,'1',4,'FIS','UAS1','88888888','85.00',''),(47,'1','7',5,'1',4,'FIS','F-01','97876763','90.00',''),(48,'1','7',5,'1',4,'FIS','F-02','97876763','0.00',''),(49,'1','7',5,'1',4,'FIS','UAS1','97876763','0.00',''),(50,'1','7',5,'1',4,'FIS','F-01','9999999999','90.00',''),(51,'1','7',5,'1',4,'FIS','F-02','9999999999','80.00',''),(52,'1','7',5,'1',4,'FIS','UAS1','9999999999','100.00','');

/*Table structure for table `tb_pelajaran_rpp` */

DROP TABLE IF EXISTS `tb_pelajaran_rpp`;

CREATE TABLE `tb_pelajaran_rpp` (
  `ID_RPP` int(11) NOT NULL AUTO_INCREMENT,
  `ID_SEKOLAH` varchar(50) NOT NULL,
  `TAHUN_AJARAN` varchar(9) NOT NULL,
  `ID_TINGKAT` int(2) NOT NULL,
  `ID_KELAS` varchar(10) NOT NULL,
  `ID_SEMESTER` int(2) NOT NULL,
  `KODE_MATA_PELAJARAN` varchar(3) NOT NULL,
  `KODE_RPP` varchar(20) NOT NULL,
  `MATERI` varchar(50) NOT NULL,
  `DESKRIPSI` text NOT NULL,
  PRIMARY KEY (`ID_RPP`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

/*Data for the table `tb_pelajaran_rpp` */

insert  into `tb_pelajaran_rpp`(`ID_RPP`,`ID_SEKOLAH`,`TAHUN_AJARAN`,`ID_TINGKAT`,`ID_KELAS`,`ID_SEMESTER`,`KODE_MATA_PELAJARAN`,`KODE_RPP`,`MATERI`,`DESKRIPSI`) values (1,'1','7',5,'1',4,'FIS','FIS1001','Kesetimbangan','<p>asckaockaoskc</p>'),(2,'1','7',5,'1',4,'FIS','FIS1002','Reproduksi','<p>pengertian reproduksi wanita</p>');

/*Table structure for table `tb_perpus_buku` */

DROP TABLE IF EXISTS `tb_perpus_buku`;

CREATE TABLE `tb_perpus_buku` (
  `ID_BUKU` int(11) NOT NULL AUTO_INCREMENT,
  `ID_SEKOLAH` int(11) NOT NULL,
  `JUDUL_BUKU` varchar(255) NOT NULL,
  `ID_JENIS` int(11) NOT NULL,
  `ID_KATALOG` int(11) NOT NULL,
  `ID_PENULIS` int(11) NOT NULL,
  `ID_PENERBIT` int(11) NOT NULL,
  `TAHUN_TERBIT` varchar(4) DEFAULT NULL,
  `TGL_MASUK` date DEFAULT NULL,
  `JUMLAH` int(3) NOT NULL DEFAULT '0',
  `HARGA_SATUAN` decimal(7,0) DEFAULT NULL,
  `KETERANGAN` text,
  `ABSTRAKSI` text,
  `COVER_BUKU` varchar(255) DEFAULT NULL,
  `KODE_BUKU` varchar(7) DEFAULT NULL,
  `HAL_ROMAWI` varchar(3) DEFAULT NULL,
  `HAL_ANGKA` varchar(3) DEFAULT NULL,
  `ILUSTRASI` varchar(1) DEFAULT NULL,
  `INDEX` varchar(1) DEFAULT NULL,
  `DIMENSI_BUKU` varchar(4) DEFAULT NULL,
  PRIMARY KEY (`ID_BUKU`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;

/*Data for the table `tb_perpus_buku` */

insert  into `tb_perpus_buku`(`ID_BUKU`,`ID_SEKOLAH`,`JUDUL_BUKU`,`ID_JENIS`,`ID_KATALOG`,`ID_PENULIS`,`ID_PENERBIT`,`TAHUN_TERBIT`,`TGL_MASUK`,`JUMLAH`,`HARGA_SATUAN`,`KETERANGAN`,`ABSTRAKSI`,`COVER_BUKU`,`KODE_BUKU`,`HAL_ROMAWI`,`HAL_ANGKA`,`ILUSTRASI`,`INDEX`,`DIMENSI_BUKU`) values (3,1,'judul buku2',1,3,1,2,'2012','2012-11-07',2,'0','','','3.png','0000001','','','0','0',''),(4,1,'judul buku3',1,3,1,2,'2012','2012-10-23',1,'0','','','0000004.jpg','0000004','XI','222','0','1','28'),(5,1,'judul buku4',1,3,1,2,'2012','2012-10-24',2,'0','','','','0000005','','','0','0',''),(7,1,'sembarang2',1,3,1,2,'2012','2012-11-07',2,'0','','','0000007.jpg','0000007','','','0','0','');

/*Table structure for table `tb_perpus_denda` */

DROP TABLE IF EXISTS `tb_perpus_denda`;

CREATE TABLE `tb_perpus_denda` (
  `ID_DENDA` int(11) NOT NULL AUTO_INCREMENT,
  `ID_SEKOLAH` int(11) NOT NULL,
  `ID_PINJAM` int(11) NOT NULL,
  `DENDA` int(10) DEFAULT NULL,
  `TELAT` int(10) DEFAULT NULL,
  PRIMARY KEY (`ID_DENDA`,`ID_PINJAM`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

/*Data for the table `tb_perpus_denda` */

insert  into `tb_perpus_denda`(`ID_DENDA`,`ID_SEKOLAH`,`ID_PINJAM`,`DENDA`,`TELAT`) values (1,1,6,800,4),(2,1,0,0,15638),(3,1,9,400,2);

/*Table structure for table `tb_perpus_eksemplar` */

DROP TABLE IF EXISTS `tb_perpus_eksemplar`;

CREATE TABLE `tb_perpus_eksemplar` (
  `ID_EKSEMPLAR` int(11) NOT NULL AUTO_INCREMENT,
  `ID_BUKU` int(11) DEFAULT NULL,
  `ID_SEKOLAH` int(11) DEFAULT NULL,
  `KODE_EKSEMPLAR` varchar(30) DEFAULT NULL,
  `STATUS` int(1) DEFAULT NULL COMMENT '0=pinjam, 1=ada, 2=rusak',
  PRIMARY KEY (`ID_EKSEMPLAR`)
) ENGINE=MyISAM AUTO_INCREMENT=31 DEFAULT CHARSET=latin1;

/*Data for the table `tb_perpus_eksemplar` */

insert  into `tb_perpus_eksemplar`(`ID_EKSEMPLAR`,`ID_BUKU`,`ID_SEKOLAH`,`KODE_EKSEMPLAR`,`STATUS`) values (4,3,1,'BU/1/002/Ari/j',1),(3,3,1,'BU/1/001/Ari/j',0),(24,3,1,'BU/1/003/Ari/j',1),(25,4,1,'BU/4/001/Ari/j',1),(26,5,1,'BU/5/001/Ari/j',1),(27,5,1,'BU/5/002/Ari/j',1),(28,6,1,'BU/6/001/Ari/s',1),(29,7,1,'BU/7/001/Ari/s',1),(30,7,1,'BU/7/002/Ari/s',1);

/*Table structure for table `tb_perpus_jenis_buku` */

DROP TABLE IF EXISTS `tb_perpus_jenis_buku`;

CREATE TABLE `tb_perpus_jenis_buku` (
  `ID_SEKOLAH` int(11) NOT NULL,
  `ID_JENIS` int(11) NOT NULL AUTO_INCREMENT,
  `KODE_JENIS` varchar(10) NOT NULL,
  `NAMA_JENIS` varchar(50) NOT NULL,
  `KETERANGAN` text,
  PRIMARY KEY (`ID_JENIS`,`KODE_JENIS`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

/*Data for the table `tb_perpus_jenis_buku` */

insert  into `tb_perpus_jenis_buku`(`ID_SEKOLAH`,`ID_JENIS`,`KODE_JENIS`,`NAMA_JENIS`,`KETERANGAN`) values (1,1,'BU','Buku2',''),(1,2,'MA','Majalah','test');

/*Table structure for table `tb_perpus_katalog` */

DROP TABLE IF EXISTS `tb_perpus_katalog`;

CREATE TABLE `tb_perpus_katalog` (
  `ID_SEKOLAH` int(11) NOT NULL,
  `ID_KATALOG` int(11) NOT NULL AUTO_INCREMENT,
  `ID_RAK` int(11) NOT NULL,
  `KODE_KATALOG` varchar(5) NOT NULL,
  `NAMA_KATALOG` varchar(50) NOT NULL,
  `KETERANGAN` text,
  PRIMARY KEY (`ID_KATALOG`,`ID_RAK`,`KODE_KATALOG`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;

/*Data for the table `tb_perpus_katalog` */

insert  into `tb_perpus_katalog`(`ID_SEKOLAH`,`ID_KATALOG`,`ID_RAK`,`KODE_KATALOG`,`NAMA_KATALOG`,`KETERANGAN`) values (1,3,2,'100','Karya Umum',''),(1,4,2,'110','Bibliografi',''),(1,5,2,'120','Perpustakaan dan Informasi Sains',''),(1,6,2,'130','Bibliografi2','');

/*Table structure for table `tb_perpus_kembali_detil` */

DROP TABLE IF EXISTS `tb_perpus_kembali_detil`;

CREATE TABLE `tb_perpus_kembali_detil` (
  `ID_KEMBALI_DETIL` int(11) NOT NULL AUTO_INCREMENT,
  `ID_PINJAM` int(11) NOT NULL,
  `ID_BUKU` int(11) NOT NULL,
  `JUMLAH` int(4) NOT NULL DEFAULT '0',
  `KETERANGAN` text,
  PRIMARY KEY (`ID_KEMBALI_DETIL`,`ID_PINJAM`,`ID_BUKU`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Data for the table `tb_perpus_kembali_detil` */

/*Table structure for table `tb_perpus_kembali_master` */

DROP TABLE IF EXISTS `tb_perpus_kembali_master`;

CREATE TABLE `tb_perpus_kembali_master` (
  `ID_KEMBALI_MASTER` int(11) NOT NULL AUTO_INCREMENT,
  `ID_SEKOLAH` int(11) NOT NULL,
  `ID_PINJAM` int(11) NOT NULL,
  `NISN` varchar(20) NOT NULL,
  `TGL_PINJAM` date DEFAULT NULL,
  `TGL_KEMBALI` date DEFAULT NULL,
  `DENDA` decimal(8,2) DEFAULT '0.00',
  PRIMARY KEY (`ID_KEMBALI_MASTER`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Data for the table `tb_perpus_kembali_master` */

/*Table structure for table `tb_perpus_konfigurasi` */

DROP TABLE IF EXISTS `tb_perpus_konfigurasi`;

CREATE TABLE `tb_perpus_konfigurasi` (
  `ID_KONFIGURASI` int(11) NOT NULL AUTO_INCREMENT,
  `JENIS_ANGGOTA` varchar(1) DEFAULT NULL,
  `MAX_PINJAM` int(2) DEFAULT NULL,
  `MAX_KEMBALI` int(2) DEFAULT NULL,
  `DENDA` int(11) DEFAULT NULL,
  PRIMARY KEY (`ID_KONFIGURASI`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;

/*Data for the table `tb_perpus_konfigurasi` */

insert  into `tb_perpus_konfigurasi`(`ID_KONFIGURASI`,`JENIS_ANGGOTA`,`MAX_PINJAM`,`MAX_KEMBALI`,`DENDA`) values (2,'1',3,3,200),(3,'2',3,3,100);

/*Table structure for table `tb_perpus_penerbit` */

DROP TABLE IF EXISTS `tb_perpus_penerbit`;

CREATE TABLE `tb_perpus_penerbit` (
  `ID_PENERBIT` int(11) NOT NULL AUTO_INCREMENT,
  `ID_SEKOLAH` int(11) NOT NULL,
  `KODE_PENERBIT` int(11) NOT NULL,
  `NAMA_PENERBIT` varchar(50) NOT NULL,
  `ALAMAT` varchar(200) DEFAULT NULL,
  `TELEPON` varchar(14) DEFAULT NULL,
  `KETERANGAN` text,
  `CONTACT_PERSON` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`ID_PENERBIT`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

/*Data for the table `tb_perpus_penerbit` */

insert  into `tb_perpus_penerbit`(`ID_PENERBIT`,`ID_SEKOLAH`,`KODE_PENERBIT`,`NAMA_PENERBIT`,`ALAMAT`,`TELEPON`,`KETERANGAN`,`CONTACT_PERSON`) values (2,1,1,'Gramedia','JL. KERTAJAYA  SURABAYA','085237905878','','ARI');

/*Table structure for table `tb_perpus_penulis` */

DROP TABLE IF EXISTS `tb_perpus_penulis`;

CREATE TABLE `tb_perpus_penulis` (
  `ID_PENULIS` int(11) NOT NULL AUTO_INCREMENT,
  `ID_SEKOLAH` int(11) NOT NULL,
  `KODE_PENULIS` int(11) NOT NULL,
  `NAMA_PENULIS` varchar(50) NOT NULL,
  `ALAMAT` varchar(200) DEFAULT NULL,
  `TELEPON` varchar(14) DEFAULT NULL,
  `KETERANGAN` text,
  PRIMARY KEY (`ID_PENULIS`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

/*Data for the table `tb_perpus_penulis` */

insert  into `tb_perpus_penulis`(`ID_PENULIS`,`ID_SEKOLAH`,`KODE_PENULIS`,`NAMA_PENULIS`,`ALAMAT`,`TELEPON`,`KETERANGAN`) values (1,1,1,'Ari nurdiansyah','JL. KERTAJAYA  SURABAYA','085237905878','');

/*Table structure for table `tb_perpus_pinjam` */

DROP TABLE IF EXISTS `tb_perpus_pinjam`;

CREATE TABLE `tb_perpus_pinjam` (
  `ID_PINJAM` int(11) NOT NULL AUTO_INCREMENT,
  `KODE_EKSEMPLAR` varchar(50) DEFAULT NULL,
  `TGL_PINJAM` date DEFAULT NULL,
  `TGL_TENGGAT` date DEFAULT NULL,
  `NISN` varchar(20) DEFAULT NULL,
  `NIP` varchar(20) DEFAULT NULL,
  `STATUS` int(1) DEFAULT NULL COMMENT '1=terpinjam; 0=ada',
  `TGL_KEMBALI` date DEFAULT NULL,
  PRIMARY KEY (`ID_PINJAM`)
) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;

/*Data for the table `tb_perpus_pinjam` */

insert  into `tb_perpus_pinjam`(`ID_PINJAM`,`KODE_EKSEMPLAR`,`TGL_PINJAM`,`TGL_TENGGAT`,`NISN`,`NIP`,`STATUS`,`TGL_KEMBALI`) values (1,'BU/1/001/Ari/j','2012-10-10','2012-10-13','123',NULL,1,NULL),(6,'BU/1/002/Ari/j','2012-10-18','2012-10-21','123','',0,'2012-10-25'),(7,'BU/1/003/Ari/j','2012-10-25','2012-10-28','123','',0,'2012-10-25'),(8,'BU/4/001/Ari/j','2012-10-25','2012-10-28','123','',0,'2012-10-25'),(9,'BU/1/002/Ari/j','2012-10-20','2012-10-23','123','',0,'2012-10-25'),(10,'BU/1/003/Ari/j','2012-10-25','2012-10-28','123','',0,'2012-10-25');

/*Table structure for table `tb_perpus_pinjam_detil` */

DROP TABLE IF EXISTS `tb_perpus_pinjam_detil`;

CREATE TABLE `tb_perpus_pinjam_detil` (
  `ID_PINJAM` varchar(10) NOT NULL,
  `KODE_BUKU` varchar(10) NOT NULL,
  `JUMLAH` int(4) NOT NULL DEFAULT '0',
  `KETERANGAN` varchar(300) DEFAULT NULL,
  PRIMARY KEY (`ID_PINJAM`,`KODE_BUKU`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Data for the table `tb_perpus_pinjam_detil` */

/*Table structure for table `tb_perpus_pinjam_master` */

DROP TABLE IF EXISTS `tb_perpus_pinjam_master`;

CREATE TABLE `tb_perpus_pinjam_master` (
  `ID_SEKOLAH` int(11) NOT NULL,
  `ID_PINJAM` varchar(10) NOT NULL,
  `NISN` varchar(20) NOT NULL,
  `TGL_PINJAM` date DEFAULT NULL,
  `TGL_kembali` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Data for the table `tb_perpus_pinjam_master` */

/*Table structure for table `tb_perpus_rak` */

DROP TABLE IF EXISTS `tb_perpus_rak`;

CREATE TABLE `tb_perpus_rak` (
  `ID_RAK` int(11) NOT NULL AUTO_INCREMENT,
  `ID_SEKOLAH` int(11) NOT NULL,
  `KODE_RAK` varchar(10) NOT NULL,
  `NAMA_RAK` varchar(50) NOT NULL,
  `KETERANGAN` varchar(300) DEFAULT NULL,
  PRIMARY KEY (`ID_RAK`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

/*Data for the table `tb_perpus_rak` */

insert  into `tb_perpus_rak`(`ID_RAK`,`ID_SEKOLAH`,`KODE_RAK`,`NAMA_RAK`,`KETERANGAN`) values (2,1,'RK1','Rak 1','');

/*Table structure for table `tb_presensi_hari` */

DROP TABLE IF EXISTS `tb_presensi_hari`;

CREATE TABLE `tb_presensi_hari` (
  `ID_PRESENSI_HARIAN` int(11) NOT NULL AUTO_INCREMENT,
  `ID_SEKOLAH` varchar(50) NOT NULL,
  `TAHUN_AJARAN` varchar(9) NOT NULL,
  `ID_TINGKAT` int(2) NOT NULL,
  `ID_KELAS` varchar(10) NOT NULL,
  `ID_SEMESTER` int(2) NOT NULL,
  `TANGGAL` date NOT NULL,
  `NISN` varchar(20) NOT NULL,
  `JENIS_KEHADIRAN` varchar(1) NOT NULL,
  `KETERANGAN` text,
  PRIMARY KEY (`ID_PRESENSI_HARIAN`)
) ENGINE=InnoDB AUTO_INCREMENT=49 DEFAULT CHARSET=latin1;

/*Data for the table `tb_presensi_hari` */

insert  into `tb_presensi_hari`(`ID_PRESENSI_HARIAN`,`ID_SEKOLAH`,`TAHUN_AJARAN`,`ID_TINGKAT`,`ID_KELAS`,`ID_SEMESTER`,`TANGGAL`,`NISN`,`JENIS_KEHADIRAN`,`KETERANGAN`) values (27,'1','7',5,'1',4,'2012-09-15','123','H',''),(28,'1','7',5,'1',4,'2012-09-15','1234','H',''),(29,'1','7',5,'1',4,'2012-09-15','5207100089','A',''),(30,'1','7',5,'1',4,'2012-09-15','88888888','S',''),(31,'1','7',5,'1',4,'2012-09-15','9999999999','I','ngantar ibu ke RS'),(43,'1','7',5,'1',4,'2012-10-05','123','H',''),(44,'1','7',5,'1',4,'2012-10-05','1234','H',''),(45,'1','7',5,'1',4,'2012-10-05','5207100089','H',''),(46,'1','7',5,'1',4,'2012-10-05','88888888','H',''),(47,'1','7',5,'1',4,'2012-10-05','97876763','H',''),(48,'1','7',5,'1',4,'2012-10-05','9999999999','A','');

/*Table structure for table `tb_presensi_jam` */

DROP TABLE IF EXISTS `tb_presensi_jam`;

CREATE TABLE `tb_presensi_jam` (
  `NAMA_SEKOLAH` varchar(50) NOT NULL,
  `TAHUN_AJARAN` varchar(9) NOT NULL,
  `TINGKAT` int(2) NOT NULL,
  `KELAS` varchar(10) NOT NULL,
  `SEMESTER` int(2) NOT NULL,
  `TANGGAL` date NOT NULL,
  `JAM_KE` varchar(12) NOT NULL,
  `NISN` varchar(20) NOT NULL,
  `JENIS_KEHADIRAN` varchar(1) NOT NULL,
  `KETERANGAN` varchar(300) DEFAULT NULL,
  PRIMARY KEY (`NAMA_SEKOLAH`,`TAHUN_AJARAN`,`TINGKAT`,`KELAS`,`SEMESTER`,`TANGGAL`,`JAM_KE`,`NISN`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Data for the table `tb_presensi_jam` */

/*Table structure for table `tb_presensi_pelajaran` */

DROP TABLE IF EXISTS `tb_presensi_pelajaran`;

CREATE TABLE `tb_presensi_pelajaran` (
  `NAMA_SEKOLAH` varchar(50) NOT NULL,
  `TAHUN_AJARAN` varchar(9) NOT NULL,
  `TINGKAT` int(2) NOT NULL,
  `KELAS` varchar(10) NOT NULL,
  `SEMESTER` int(2) NOT NULL,
  `TANGGAL` date NOT NULL,
  `JAM_KE` varchar(12) NOT NULL,
  `JENIS_KEHADIRAN` varchar(1) NOT NULL,
  `KETERANGAN` varchar(300) DEFAULT NULL,
  PRIMARY KEY (`NAMA_SEKOLAH`,`TAHUN_AJARAN`,`TINGKAT`,`KELAS`,`SEMESTER`,`TANGGAL`,`JAM_KE`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Data for the table `tb_presensi_pelajaran` */

/*Table structure for table `tb_psb` */

DROP TABLE IF EXISTS `tb_psb`;

CREATE TABLE `tb_psb` (
  `NAMA_SEKOLAH` varchar(50) NOT NULL,
  `NAMA_PSB` varchar(50) NOT NULL,
  `TAHUN_AJARAN` varchar(9) NOT NULL,
  `NO_AWAL_SISWA_BARU` int(2) NOT NULL,
  `JUMLAH_TAMPUNG` int(2) NOT NULL,
  `KETERANGAN` varchar(300) DEFAULT NULL,
  `ISAKTIF` int(1) DEFAULT NULL,
  PRIMARY KEY (`NAMA_SEKOLAH`,`NAMA_PSB`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Data for the table `tb_psb` */

/*Table structure for table `tb_psb_hasil_ujian` */

DROP TABLE IF EXISTS `tb_psb_hasil_ujian`;

CREATE TABLE `tb_psb_hasil_ujian` (
  `NAMA_SEKOLAH` varchar(50) NOT NULL,
  `NAMA_PSB` varchar(50) NOT NULL,
  `NAMA_KELOMPOK_PSB` varchar(50) NOT NULL,
  `KODE_MATA_PELAJARAN` varchar(3) NOT NULL,
  `NO_PENDAFTARAN` varchar(3) NOT NULL,
  `NILAI` decimal(3,2) NOT NULL,
  `KETERANGAN` varchar(300) DEFAULT NULL,
  PRIMARY KEY (`NAMA_SEKOLAH`,`NAMA_PSB`,`NAMA_KELOMPOK_PSB`,`KODE_MATA_PELAJARAN`,`NO_PENDAFTARAN`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Data for the table `tb_psb_hasil_ujian` */

/*Table structure for table `tb_psb_kelompok` */

DROP TABLE IF EXISTS `tb_psb_kelompok`;

CREATE TABLE `tb_psb_kelompok` (
  `NAMA_SEKOLAH` varchar(50) NOT NULL,
  `NAMA_PSB` varchar(50) NOT NULL,
  `TAHUN_AJARAN` varchar(9) NOT NULL,
  `NAMA_KELOMPOK_PSB` varchar(50) NOT NULL,
  `JUMLAH_TAMPUNG` int(2) NOT NULL,
  `KETERANGAN` varchar(300) DEFAULT NULL,
  PRIMARY KEY (`NAMA_SEKOLAH`,`NAMA_PSB`,`NAMA_KELOMPOK_PSB`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Data for the table `tb_psb_kelompok` */

/*Table structure for table `tb_psb_siswa` */

DROP TABLE IF EXISTS `tb_psb_siswa`;

CREATE TABLE `tb_psb_siswa` (
  `NAMA_SEKOLAH` varchar(50) NOT NULL,
  `NAMA_PSB` varchar(50) NOT NULL,
  `NAMA_KELOMPOK_PSB` varchar(50) NOT NULL,
  `NO_PENDAFTARAN` varchar(3) NOT NULL,
  `TAHUN_MASUK` varchar(4) NOT NULL,
  `NISN` varchar(20) NOT NULL,
  `NAMA_LENGKAP` varchar(50) NOT NULL,
  `NAMA_PANGGILAN` varchar(50) NOT NULL,
  `JENIS_KELAMIN` varchar(1) NOT NULL,
  `TEMPAT_LAHIR` varchar(50) NOT NULL,
  `TANGGAL_LAHIR` date NOT NULL,
  `AGAMA` varchar(50) NOT NULL,
  `SUKU` varchar(50) NOT NULL,
  `STATUS` varchar(50) NOT NULL,
  `KONDISI_KELUARGA` varchar(50) NOT NULL,
  `WARGA_NEGARA` varchar(50) NOT NULL,
  `ANAK_KE` int(2) NOT NULL,
  `DARI_JUMLAH_SAUDARA` int(2) NOT NULL,
  `BAHASA` varchar(50) NOT NULL,
  `FOTO` varchar(300) NOT NULL,
  `ALAMAT_ASAL` varchar(200) NOT NULL,
  `ALAMAT_DOMISILI` varchar(200) NOT NULL,
  `KODEPOS` varchar(5) NOT NULL,
  `TELEPON` varchar(12) NOT NULL,
  `HP` varchar(12) NOT NULL,
  `EMAIL` varchar(50) NOT NULL,
  `ASAL_SEKOLAH` varchar(50) NOT NULL,
  `KETERANGAN_ASAL_SEKOLAH` varchar(200) NOT NULL,
  `GOLONGAN_DARAH` varchar(2) NOT NULL,
  `BERAT_BADAN` int(3) NOT NULL,
  `TINGGI_BADAN` int(3) NOT NULL,
  `PENYAKIT_YANG_DIDERITA` varchar(100) NOT NULL,
  `NAMA_AYAH` varchar(50) NOT NULL,
  `IS_AYAH_ALMARHUM` int(1) NOT NULL,
  `PENDIDIKAN_AYAH` varchar(50) NOT NULL,
  `PEKERJAAN_AYAH` varchar(50) NOT NULL,
  `PENGHASILAN_AYAH` int(12) NOT NULL,
  `TELEPON_AYAH` varchar(12) NOT NULL,
  `HP_AYAH` varchar(12) NOT NULL,
  `EMAIL_AYAH` varchar(50) NOT NULL,
  `NAMA_IBU` varchar(50) NOT NULL,
  `IS_IBU_ALMARHUM` int(1) NOT NULL,
  `PENDIDIKAN_IBU` varchar(50) NOT NULL,
  `PEKERJAAN_IBU` varchar(50) NOT NULL,
  `PENGHASILAN_IBU` int(12) NOT NULL,
  `TELEPON_IBU` varchar(12) NOT NULL,
  `HP_IBU` varchar(12) NOT NULL,
  `EMAIL_IBU` varchar(50) NOT NULL,
  `NAMA_WALI` varchar(50) NOT NULL,
  `PENDIDIKAN_WALI` varchar(50) NOT NULL,
  `PEKERJAAN_WALI` varchar(50) NOT NULL,
  `PENGHASILAN_WALI` int(12) NOT NULL,
  `TELEPON_WALI` varchar(12) NOT NULL,
  `HP_WALI` varchar(12) NOT NULL,
  `EMAIL_WALI` varchar(50) NOT NULL,
  `ALAMAT_WALI` varchar(50) NOT NULL,
  `KETERANGAN` varchar(300) DEFAULT NULL,
  PRIMARY KEY (`NAMA_SEKOLAH`,`NAMA_PSB`,`NAMA_KELOMPOK_PSB`,`NO_PENDAFTARAN`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Data for the table `tb_psb_siswa` */

/*Table structure for table `tb_psb_siswa_lolos` */

DROP TABLE IF EXISTS `tb_psb_siswa_lolos`;

CREATE TABLE `tb_psb_siswa_lolos` (
  `NAMA_SEKOLAH` varchar(50) NOT NULL,
  `NAMA_PSB` varchar(50) NOT NULL,
  `NAMA_KELOMPOK_PSB` varchar(50) NOT NULL,
  `NO_PENDAFTARAN` varchar(3) NOT NULL,
  `KETERANGAN` varchar(300) DEFAULT NULL,
  PRIMARY KEY (`NAMA_SEKOLAH`,`NAMA_PSB`,`NAMA_KELOMPOK_PSB`,`NO_PENDAFTARAN`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Data for the table `tb_psb_siswa_lolos` */

/*Table structure for table `tb_psb_sumbangan` */

DROP TABLE IF EXISTS `tb_psb_sumbangan`;

CREATE TABLE `tb_psb_sumbangan` (
  `NAMA_SEKOLAH` varchar(50) NOT NULL,
  `NAMA_PSB` varchar(50) NOT NULL,
  `NAMA_KELOMPOK_PSB` varchar(50) NOT NULL,
  `JENIS_SUMBANGAN` varchar(50) NOT NULL,
  `JUMLAH_SUMBANGAN` int(2) NOT NULL,
  `KETERANGAN` varchar(300) DEFAULT NULL,
  PRIMARY KEY (`NAMA_SEKOLAH`,`NAMA_PSB`,`NAMA_KELOMPOK_PSB`,`JENIS_SUMBANGAN`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Data for the table `tb_psb_sumbangan` */

/*Table structure for table `tb_psb_sumbangan_siswa` */

DROP TABLE IF EXISTS `tb_psb_sumbangan_siswa`;

CREATE TABLE `tb_psb_sumbangan_siswa` (
  `DEPARTEMEN` varchar(50) NOT NULL,
  `NAMA_PSB` varchar(50) NOT NULL,
  `NAMA_KELOMPOK_PSB` varchar(50) NOT NULL,
  `NO_PENDAFTARAN` varchar(3) NOT NULL,
  `JENIS_SUMBANGAN` varchar(50) NOT NULL,
  `JUMLAH_SUMBANGAN` int(2) NOT NULL,
  `KETERANGAN` varchar(300) DEFAULT NULL,
  PRIMARY KEY (`DEPARTEMEN`,`NAMA_PSB`,`NAMA_KELOMPOK_PSB`,`NO_PENDAFTARAN`,`JENIS_SUMBANGAN`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Data for the table `tb_psb_sumbangan_siswa` */

/*Table structure for table `tb_psb_ujian` */

DROP TABLE IF EXISTS `tb_psb_ujian`;

CREATE TABLE `tb_psb_ujian` (
  `NAMA_SEKOLAH` varchar(50) NOT NULL,
  `NAMA_PSB` varchar(50) NOT NULL,
  `NAMA_KELOMPOK_PSB` varchar(50) NOT NULL,
  `KODE_MATA_PELAJARAN` varchar(3) NOT NULL,
  `NAMA_MATA_PELAJARAN` varchar(50) NOT NULL,
  `KETERANGAN` varchar(300) DEFAULT NULL,
  PRIMARY KEY (`NAMA_SEKOLAH`,`NAMA_PSB`,`NAMA_KELOMPOK_PSB`,`KODE_MATA_PELAJARAN`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Data for the table `tb_psb_ujian` */

/*Table structure for table `tb_siswa` */

DROP TABLE IF EXISTS `tb_siswa`;

CREATE TABLE `tb_siswa` (
  `ID_SEKOLAH` varchar(50) NOT NULL,
  `TAHUN_MASUK` varchar(4) NOT NULL,
  `NISN` varchar(20) NOT NULL,
  `NIPDN` varchar(10) DEFAULT NULL,
  `NAMA_LENGKAP` varchar(50) NOT NULL,
  `NAMA_PANGGILAN` varchar(50) NOT NULL,
  `JENIS_KELAMIN` varchar(1) NOT NULL,
  `TEMPAT_LAHIR` varchar(50) NOT NULL,
  `TANGGAL_LAHIR` date NOT NULL,
  `AGAMA` varchar(50) NOT NULL,
  `SUKU` varchar(50) NOT NULL,
  `STATUS` varchar(50) NOT NULL,
  `WARGA_NEGARA` varchar(50) NOT NULL,
  `NAMA_WNA` varchar(50) NOT NULL,
  `ANAK_KE` int(2) NOT NULL,
  `DARI_JUMLAH_SAUDARA` int(2) NOT NULL,
  `BAHASA` varchar(50) NOT NULL,
  `FOTO` varchar(300) DEFAULT NULL,
  `ALAMAT_ASAL` varchar(200) DEFAULT NULL,
  `ALAMAT_DOMISILI` varchar(200) NOT NULL,
  `KODEPOS` varchar(5) DEFAULT NULL,
  `TELEPON` varchar(12) DEFAULT NULL,
  `HP` varchar(12) DEFAULT NULL,
  `EMAIL` varchar(50) DEFAULT NULL,
  `ASAL_SEKOLAH` varchar(50) NOT NULL,
  `KETERANGAN_ASAL_SEKOLAH` varchar(200) DEFAULT NULL,
  `GOLONGAN_DARAH` varchar(2) DEFAULT NULL,
  `BERAT_BADAN` int(3) DEFAULT NULL,
  `TINGGI_BADAN` int(3) DEFAULT NULL,
  `PENYAKIT_YANG_DIDERITA` varchar(100) DEFAULT NULL,
  `NAMA_AYAH` varchar(50) DEFAULT NULL,
  `IS_AYAH_ALMARHUM` int(1) DEFAULT NULL,
  `PENDIDIKAN_AYAH` varchar(50) DEFAULT NULL,
  `PEKERJAAN_AYAH` varchar(50) DEFAULT NULL,
  `PENGHASILAN_AYAH` int(12) DEFAULT NULL,
  `TELEPON_AYAH` varchar(12) DEFAULT NULL,
  `HP_AYAH` varchar(12) DEFAULT NULL,
  `EMAIL_AYAH` varchar(50) DEFAULT NULL,
  `NAMA_IBU` varchar(50) DEFAULT NULL,
  `IS_IBU_ALMARHUM` int(1) DEFAULT NULL,
  `PENDIDIKAN_IBU` varchar(50) DEFAULT NULL,
  `PEKERJAAN_IBU` varchar(50) DEFAULT NULL,
  `PENGHASILAN_IBU` int(12) DEFAULT NULL,
  `TELEPON_IBU` varchar(12) DEFAULT NULL,
  `HP_IBU` varchar(12) DEFAULT NULL,
  `EMAIL_IBU` varchar(50) DEFAULT NULL,
  `NAMA_WALI` varchar(50) DEFAULT NULL,
  `PENDIDIKAN_WALI` varchar(50) DEFAULT NULL,
  `PEKERJAAN_WALI` varchar(50) DEFAULT NULL,
  `PENGHASILAN_WALI` int(12) DEFAULT NULL,
  `TELEPON_WALI` varchar(12) DEFAULT NULL,
  `HP_WALI` varchar(12) DEFAULT NULL,
  `EMAIL_WALI` varchar(50) DEFAULT NULL,
  `ALAMAT_WALI` varchar(50) DEFAULT NULL,
  `KETERANGAN` text,
  `ISAKTIF` int(1) DEFAULT '1',
  PRIMARY KEY (`ID_SEKOLAH`,`NISN`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Data for the table `tb_siswa` */

insert  into `tb_siswa`(`ID_SEKOLAH`,`TAHUN_MASUK`,`NISN`,`NIPDN`,`NAMA_LENGKAP`,`NAMA_PANGGILAN`,`JENIS_KELAMIN`,`TEMPAT_LAHIR`,`TANGGAL_LAHIR`,`AGAMA`,`SUKU`,`STATUS`,`WARGA_NEGARA`,`NAMA_WNA`,`ANAK_KE`,`DARI_JUMLAH_SAUDARA`,`BAHASA`,`FOTO`,`ALAMAT_ASAL`,`ALAMAT_DOMISILI`,`KODEPOS`,`TELEPON`,`HP`,`EMAIL`,`ASAL_SEKOLAH`,`KETERANGAN_ASAL_SEKOLAH`,`GOLONGAN_DARAH`,`BERAT_BADAN`,`TINGGI_BADAN`,`PENYAKIT_YANG_DIDERITA`,`NAMA_AYAH`,`IS_AYAH_ALMARHUM`,`PENDIDIKAN_AYAH`,`PEKERJAAN_AYAH`,`PENGHASILAN_AYAH`,`TELEPON_AYAH`,`HP_AYAH`,`EMAIL_AYAH`,`NAMA_IBU`,`IS_IBU_ALMARHUM`,`PENDIDIKAN_IBU`,`PEKERJAAN_IBU`,`PENGHASILAN_IBU`,`TELEPON_IBU`,`HP_IBU`,`EMAIL_IBU`,`NAMA_WALI`,`PENDIDIKAN_WALI`,`PEKERJAAN_WALI`,`PENGHASILAN_WALI`,`TELEPON_WALI`,`HP_WALI`,`EMAIL_WALI`,`ALAMAT_WALI`,`KETERANGAN`,`ISAKTIF`) values ('1','2013','00000000','','suroni','','L','surabaya','2006-11-18','1','','','0','',0,0,'','00000000.gif','','','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),('1','2012','1111111111111','2222222222','satu dua tiga','','L','sby','2007-12-18','1','','','0','',0,0,'','1111111111111.jpg','','','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),('1','2012','123','4444444444','Johan Budi22','johansyah','L','Surbaya','1993-09-21','3','','','WNI','',0,0,'1','123.jpg','asal','domisili','','','','','','','AB',0,0,'','SURAJI',0,'0','0',0,'','','','',0,'0','0',0,'','','','','0','0',0,'','','','','',1),('1','2012','1230000','','Cibi cibi burger','','P','Surabaya','1993-04-16','1','','','0','',0,0,'','0','','','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),('1','2012','1234','','Johan Budi2','','L','Surbaya','1989-01-01','1','','','WNI','',0,0,'','1234.png','','','','','','','','','AB',0,0,'','',0,'0','0',0,'','','','',0,'0','0',0,'','','','','0','0',0,'','JHGJH','','','',1),('1','2012','12344523425','','Johan Budi2','','L','Surabaya','2012-10-17','1','','','WNA','australia',0,0,'','','','','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),('1','2013','3456097654','','ARRRYYY','','L','Surabaya','2005-11-17','1','','','0','',0,0,'','3456097654.png','','','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),('1','2012','44444444444',NULL,'Sugianto Halim','','0','','0000-00-00','','','','0','',0,0,'','','','','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),('1','2012','5207100075',NULL,'Ari Nurdiansya','Ari','0','','2000-01-10','','','','0','',0,0,'','0','','','','','','','','','O',12,21,'kljfasld','JH',0,'0','0',0,'','','','',0,'0','0',0,'','','','','0','0',0,'','','','','',1),('1','2012','5207100088','123455555','Zainul Abidin','','L','Surabaya','2005-01-14','1','','','0','',0,0,'','5207100088.jpg','','','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),('1','2012','5207100089',NULL,'Zinzia Shavira','Zinzi','0','KEDIRI','1989-01-10','','','','0','',0,0,'','0','','','','','','','','','0',12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),('1','2013','65237847837','','Cahyo','','L','Kediri','1990-02-02','6','','','WNI','',0,0,'','65237847837.jpg','','','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),('1','2012','777777777777','','reni','','P','Surabaya','2007-12-18','1','','','0','',0,0,'','777777777777.jpg','','','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),('1','2012','88888888',NULL,'adsfad','','0','','0000-00-00','','','','0','',0,0,'','','','','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),('1','2012','888888888888',NULL,'SuperJoni','','0','','0000-00-00','','','','0','',0,0,'','','','','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),('1','2013','97876763','','jonolono','','L','KEDIRI','2012-09-13','1','','','WNI','',0,0,'','','','','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),('1','2012','99090','','Cibi cibi','','P','Surabaya','2000-10-03','1','','','WNI','',0,0,'','','','','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),('1','2012','9987532357887','','ZINNNN','','L','KEDIRI','2006-10-15','1','','','0','',0,0,'',NULL,'','','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),('1','2012','9999999999',NULL,'HENDRA','','L','','0000-00-00','','','','WNI','',0,0,'','','','','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1);

/*Table structure for table `tb_siswa_kelas` */

DROP TABLE IF EXISTS `tb_siswa_kelas`;

CREATE TABLE `tb_siswa_kelas` (
  `ID_SEKOLAH` int(11) NOT NULL,
  `ID_TAHUNAJARAN` int(11) NOT NULL,
  `ID_TINGKAT` int(11) NOT NULL,
  `ID_KELAS` int(11) NOT NULL,
  `NISN` varchar(20) NOT NULL,
  PRIMARY KEY (`ID_SEKOLAH`,`ID_TAHUNAJARAN`,`ID_TINGKAT`,`ID_KELAS`,`NISN`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Data for the table `tb_siswa_kelas` */

insert  into `tb_siswa_kelas`(`ID_SEKOLAH`,`ID_TAHUNAJARAN`,`ID_TINGKAT`,`ID_KELAS`,`NISN`) values (1,7,5,1,'00000000'),(1,7,5,1,'1111111111111'),(1,7,5,1,'123'),(1,7,5,1,'1230000'),(1,7,5,1,'12300003'),(1,7,5,1,'1234'),(1,7,5,1,'12344523425'),(1,7,5,1,'3456097654'),(1,7,5,1,'5207100088'),(1,7,5,1,'5207100089'),(1,7,5,1,'65237847837'),(1,7,5,1,'777777777777'),(1,7,5,1,'88888888'),(1,7,5,1,'97876763'),(1,7,5,1,'99090'),(1,7,5,1,'9987532357887'),(1,7,5,1,'9999999999'),(1,7,6,5,'5207100075'),(1,7,6,5,'888888888888'),(1,7,7,7,'44444444444');

/*Table structure for table `tb_siswa_lulus` */

DROP TABLE IF EXISTS `tb_siswa_lulus`;

CREATE TABLE `tb_siswa_lulus` (
  `ID_SEKOLAH` int(11) NOT NULL,
  `ID_TAHUNAJARAN` int(11) NOT NULL,
  `ID_TINGKAT` int(2) NOT NULL,
  `ID_KELAS` int(11) NOT NULL,
  `NISN` varchar(20) NOT NULL,
  `JENIS_KELULUSAN` varchar(1) NOT NULL,
  `KETERANGAN` int(11) DEFAULT NULL,
  PRIMARY KEY (`ID_SEKOLAH`,`ID_TAHUNAJARAN`,`ID_TINGKAT`,`ID_KELAS`,`NISN`,`JENIS_KELULUSAN`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Data for the table `tb_siswa_lulus` */

/*Table structure for table `tb_siswa_naik_kelas` */

DROP TABLE IF EXISTS `tb_siswa_naik_kelas`;

CREATE TABLE `tb_siswa_naik_kelas` (
  `ID_SEKOLAH` int(11) NOT NULL,
  `ID_TAHUNAJARAN` int(11) NOT NULL,
  `ID_TINGKAT` int(11) NOT NULL,
  `ID_KELAS` int(11) NOT NULL,
  `NISN` varchar(20) NOT NULL,
  `JENIS_KENAIKAN` varchar(1) NOT NULL,
  `KETERANGAN` varchar(300) DEFAULT NULL,
  PRIMARY KEY (`ID_SEKOLAH`,`ID_TAHUNAJARAN`,`ID_TINGKAT`,`ID_KELAS`,`NISN`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Data for the table `tb_siswa_naik_kelas` */

insert  into `tb_siswa_naik_kelas`(`ID_SEKOLAH`,`ID_TAHUNAJARAN`,`ID_TINGKAT`,`ID_KELAS`,`NISN`,`JENIS_KENAIKAN`,`KETERANGAN`) values (1,7,5,1,'123','1','naikkk'),(1,7,5,1,'1234','1','naik'),(1,7,5,1,'88888888','2','naik');

/*Table structure for table `tb_siswa_pindah_kelas` */

DROP TABLE IF EXISTS `tb_siswa_pindah_kelas`;

CREATE TABLE `tb_siswa_pindah_kelas` (
  `ID_SEKOLAH` int(11) NOT NULL,
  `ID_TAHUNAJARAN` int(11) NOT NULL,
  `ID_TINGKAT` int(11) NOT NULL,
  `ID_KELAS` int(11) NOT NULL,
  `NISN` varchar(20) NOT NULL,
  `ID_KELAS_TUJUAN` int(11) NOT NULL,
  PRIMARY KEY (`ID_SEKOLAH`,`ID_TAHUNAJARAN`,`ID_TINGKAT`,`ID_KELAS`,`NISN`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Data for the table `tb_siswa_pindah_kelas` */

insert  into `tb_siswa_pindah_kelas`(`ID_SEKOLAH`,`ID_TAHUNAJARAN`,`ID_TINGKAT`,`ID_KELAS`,`NISN`,`ID_KELAS_TUJUAN`) values (1,7,5,1,'88888888',2),(1,7,5,2,'88888888',1),(1,7,6,6,'888888888888',5);

/*Table structure for table `tb_siswa_pindah_sekolah` */

DROP TABLE IF EXISTS `tb_siswa_pindah_sekolah`;

CREATE TABLE `tb_siswa_pindah_sekolah` (
  `ID_SEKOLAH` int(11) NOT NULL,
  `ID_TAHUNAJARAN` int(11) NOT NULL,
  `ID_TINGKAT` int(11) NOT NULL,
  `ID_KELAS` int(11) NOT NULL,
  `NISN` varchar(20) NOT NULL,
  `NAMA_SEKOLAH_TUJUAN` varchar(100) NOT NULL,
  PRIMARY KEY (`ID_SEKOLAH`,`ID_TAHUNAJARAN`,`ID_TINGKAT`,`NISN`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Data for the table `tb_siswa_pindah_sekolah` */

/*Table structure for table `tb_upload_materi` */

DROP TABLE IF EXISTS `tb_upload_materi`;

CREATE TABLE `tb_upload_materi` (
  `ID_MATERI` int(11) NOT NULL AUTO_INCREMENT,
  `ID_PELAJARAN` varchar(50) DEFAULT NULL,
  `JUDUL` varchar(200) DEFAULT NULL,
  `URL_MATERI` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`ID_MATERI`)
) ENGINE=MyISAM AUTO_INCREMENT=21 DEFAULT CHARSET=latin1;

/*Data for the table `tb_upload_materi` */

insert  into `tb_upload_materi`(`ID_MATERI`,`ID_PELAJARAN`,`JUDUL`,`URL_MATERI`) values (1,'FIS','Kesetimbangan','[SUITS]_Selamat_Datang.pdf'),(20,'FIS','GLBB','');

/*Table structure for table `tb_upload_surat` */

DROP TABLE IF EXISTS `tb_upload_surat`;

CREATE TABLE `tb_upload_surat` (
  `ID_SURAT` int(11) NOT NULL AUTO_INCREMENT,
  `DESKRIPSI` varchar(300) DEFAULT NULL,
  `URL_UPLOAD_SURAT` varchar(200) DEFAULT NULL,
  `ID_KATEGORI` int(11) DEFAULT NULL,
  PRIMARY KEY (`ID_SURAT`)
) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;

/*Data for the table `tb_upload_surat` */

insert  into `tb_upload_surat`(`ID_SURAT`,`DESKRIPSI`,`URL_UPLOAD_SURAT`,`ID_KATEGORI`) values (2,'coba upload','[SUITS]_Selamat_Datang.pdf',1),(10,'coba yah','Cerpen.doc',1);

/*Table structure for table `users` */

DROP TABLE IF EXISTS `users`;

CREATE TABLE `users` (
  `ID_USER` int(11) NOT NULL AUTO_INCREMENT,
  `IDROLE` int(11) DEFAULT NULL,
  `NAMA` varchar(100) NOT NULL,
  `JABATAN` varchar(100) NOT NULL,
  `ID_SEKOLAH` int(11) NOT NULL,
  `EMAIL` varchar(100) DEFAULT NULL,
  `USERNAME` varchar(100) NOT NULL,
  `PASSWORD` varchar(100) NOT NULL,
  `STATUS` int(11) DEFAULT NULL,
  PRIMARY KEY (`ID_USER`),
  KEY `FK_RELATIONSHIP_18` (`IDROLE`),
  CONSTRAINT `FK_RELATIONSHIP_18` FOREIGN KEY (`IDROLE`) REFERENCES `role` (`IDROLE`)
) ENGINE=InnoDB AUTO_INCREMENT=71 DEFAULT CHARSET=latin1;

/*Data for the table `users` */

insert  into `users`(`ID_USER`,`IDROLE`,`NAMA`,`JABATAN`,`ID_SEKOLAH`,`EMAIL`,`USERNAME`,`PASSWORD`,`STATUS`) values (1,0,'Administrator Diknas','Kepala Diknas',-1,'hrd@diknas.co.id','diknas','2232d16aa4c1671c196c440bf3ed267d',1),(3,1,'Dedy H. Sutisna','Kepala Sekolah',1,'dedy.sutisna@smarti.com','admin','21232f297a57a5a743894a0e4a801fc3',1),(66,2,'Sugiharto','Guru Agama',1,'sugih@diknas.com','sugih','fbcc66cb8b819f2f2a5ba3644e96b5b1',1),(68,2,'guru biasa','guru kedua',1,'guru@gmail.com','guru','77e69c137812518e359196bb2f5e9bb9',1),(69,3,'karyawan','Karyawan',1,'kary@gmail.com','karyawan','9e014682c94e0f2cc834bf7348bda428',1),(70,2,'Kepala Sekolah2','Kepala Sekolah',1,'bakoelsouvenir@yahoo.com','admin2','c84258e9c39059a89ab77d846ddab909',0);

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
